home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,101 to 4,200 / aol-file-protocol-4400-4101-to-4200.zip / AOLDLs / ADV - Articles & Misc / Human Interface Tech. Notes / HIN.shk / HINNOT / HIN.004...MOVA < prev    next >
Text File  |  1991-07-28  |  3KB  |  28 lines

  1.  
  2. _____________________________________________________________________________________________
  3.  
  4. Note #4    Movable Modal Dialog Boxes
  5.  
  6.     Written by:  Scott Jenson    January 1990
  7. _____________________________________________________________________________________________
  8.  
  9. Discussion of a new modal window style that can be moved by dragging its title bar.
  10. _____________________________________________________________________________________________
  11.  
  12. A standard modal dialog box works well as long as you, the developer, are asking such questions as ╥How do you want to print this document?╙ or ╥Save changes before quitting?╙  However, sometimes you need to ask a question and the user needs to see the document contents to make a decision.  A common example is a Find╔ or Replace╔ dialog box.  The usual rule of choice is to use a modeless dialog box since 1) it╒s less intrusive on the many different ways people may want to use your software, and 2) since it╒s  movable, the user can easily move it around to view covered parts of the document.  There are some cases, however, when the question or response task needs to be modal, but the user still might want to view what╒s behind the dialog box.  An example would be a complex attribute change like adding a border to a paragraph of text.  You might want to see the text or even other paragraphs while you╒re setting up the border.
  13.  
  14. In these cases use a movable modal dialog box.  This window design gives you visual feedback both that it is a modal dialog box and also that you can drag it from the title bar.  Figure 1 shows a simple example of this dialog box style.
  15.  
  16.  
  17.  
  18. Figure 1╨Movable modal dialog box
  19.  
  20.  
  21. A couple of points to keep in mind:
  22.  
  23. Ñ    Any selection made in the dialog box should immediately update the document contents.  The OK button  then means ╥accept this change╙ and the Cancel button means ╥undo all changes done by this dialog box.╙  Some applications use an Apply button to approximate this behavior but this only confuses the meaning of OK and Cancel.
  24. Ñ    With this dialog box, it is not necessary to keep your application from switching to other MultiFinder layers.  System 7.0 uses this method to show an application is busy with some time-consuming operation, yet can still be switched into the background.
  25. Ñ    When you create this dialog box, be sure to use the new window type.  Do not draw a rect in a documentProc.  System 7.0 has as new selector on the standard 'WDEF' resource for this type of window.  For System Software 6.0.x, you can obtain a new 'WDEF' resource on AppleLink in the the Human Interface section of the Developer Services Bulletin Board or request a copy by writing to AppleLink address MACINTERFACE.
  26. Ñ    Make sure to save the position of the window for the next time it╒s used.
  27. Ñ    Do not use this dialog box when a modeless dialog box would work instead.
  28.